//
//  UIImage+image.m
//  
//
//  Created by wangyyaning on 16/1/22.
//  Copyright © 2016年 Bastion. All rights reserved.
//

#import "UIImage+image.h"

@implementation UIImage (image)
/**
 *  原始图片方法
 *
 *  @param imageName 图片名字
 *
 *  @return 返回不被渲染的图片
 */
+ (instancetype)imageWithOriginalName:(NSString*)imageName{
    
    UIImage * image = [UIImage imageNamed:imageName];
    
    return [image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
}
+ (instancetype)imageWithStretchableName:(NSString *)imageName{
    UIImage *image = [UIImage imageNamed:imageName];
    
    return [image stretchableImageWithLeftCapWidth:image.size.width * 0.5 topCapHeight:image.size.height * 0.5];
}
@end
